package com.zxl.responsibilitychain;


/**
 * @Description: 验证参数handler
 * @Author:zxl
 * @Date: 2023/8/13
 */
public class ValidateHandler extends Handler {
    @Override
    public void doHandler(User user) {
        if (null == user.getUserName() || null == user.getPassWord()) {
            System.out.println("用户名和密码不能为空");
            return;
        }

        if (null != next) {
            next.doHandler(user);
        }
    }
}